import request from '@/utils/request'

// 获取个人中心用户信息
export function getPersonalCenter(userId) {
	return request({
		'url': '/font/user/personalCenter/' + userId,
		'method': 'get',
	})
}

// 查询参数详细
export function getConfig(configKey) {
	return request({
		url: `/system/config/${configKey}/configValue`,
		method: 'get'
	})
}

// 获取用户头像
export function getHeadSculpture(userId) {
	return request({
		'url': '/user/headSculpture/getHeadSculpture/' + userId,
		'method': 'get',
	})
}

/* 保存用户头像 */
export function addHeadSculpture(data) {
	return request({
		'url': '/user/headSculpture/addHeadSculpture',
		'method': 'post',
		'data': data
	})
}


// 移动端登录获取手机号
export function getWxPhone(data) {
	return request({
		url: '/mobile/getPhoneNumber',
		method: 'post',
		params: data
	})
}

/* 获取企业信息 */
export function getCompany(data) {
	return request({
		url: '/credit/company/mobile/getCompany',
		method: 'get',
		params: data
	})
}

// 获取入企记录
export function getEnterRecordList(data) {
	return request({
		url: '/enterprise/task/mobile/getPage',
		method: 'get',
		params: data
	})
}

//移动端发送短信验证码
export function sendSmsCode(data) {
	return request({
		url: '/mobile/sendSmsCode',
		method: 'post',
		params: data
	})
}

// 获取入企详情
export function getEnterRecordDetais(taskNo) {
	return request({
		url: '/enterprise/task/mobile/detail/' + taskNo,
		method: 'get',
	})
}


// 提交认证企业
export function subAuthenticate(data) {
	return request({
		url: '/enterprise/user/company/record/authentication',
		method: 'post',
		data: data
	})
}

//注销前端用户
export function logOffUser(userId) {
	return request({
		url: '/enterprise/task/mobile/delete/'+ userId,
		method: 'post',
	})
}


// 已认证企业列表
export function getAuthenticateList(data) {
	return request({
		url: '/enterprise/user/company/record/listByUserId',
		method: 'get',
		params: data
	})
}

// 设置默认企业
export function setDefault(data) {
	return request({
		url: '/enterprise/task/mobile/def',
		method: 'post',
		params: data
	})
}

// 解绑企业
export function setUnbind(data) {
	return request({
		url: '/enterprise/user/company/record/unbind',
		method: 'post',
		data: data
	})
}

/* 提交入企反馈 */
export function enterFeedback(data) {
	return request({
		url: '/enterprise/task/mobile/feedback',
		method: 'post',
		data: data
	})
}


// 问卷列表
export function getMobilePageList(data) {
	return request({
		url: '/questionnaire/survey/mobilePage',
		method: 'get',
		params: data
	})
}

// 一键反馈
export function oneKeyFeedBack(data) {
	return request({
		url: '/enterprise/feedback/mobile/oneClick',
		method: 'post',
		data: data
	})
}


// 认证入企人员
export function authentication(userId) {
	return request({
		url: '/font/user/authentication/' + userId,
		method: 'post',
	})
}

//临时入企
export function temporaryEnter(data) {
	return request({
		url: '/enterprise/task/mobile/fontReport',
		method: 'post',
		data: data
	})
}


// 获取企业统一信用代码
export function getSocialCredit(data) {
	return request({
		url: '/enterprise/task/mobile/getSocialCredit',
		method: 'get',
		params: data
	})
}
